package com.video.dao;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;

import com.video.vo.DirectionVO;

public class directionDao{{

	DirectionVO dv = null;
	try {
		
		Class.forName("com.mysql.jdbc.Driver");
		Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/video","root","123456");
		PreparedStatement pre = conn.prepareStatement("INSERT INTO v_type(tname,did) VALUES(?,?)");
		pre.setString(1, tname);
		pre.setInt(2, Integer.parseInt(did));
		pre.executeUpdate();
	} catch (Exception e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
}
}
